function indi = chmfile(mname); 
% ====================================================
% function indi = chmfile(mname); 
% Check m-file with name MNAME (string) exists in matlab 
% search path 
% See CHEXIST.m for files in subdirectories 
% AJ March 28 2006 
% =================================================
mname = char(mname); 
disp(['Checking M-file ',mname,'.m exists'] ); 
indi = exist(mname); 
if indi~=2 
    str = ['M-file ',mname,'.m could not be found'] 
    error( str ) 
end 


